package com.exam.po;

import java.util.ArrayList;
import java.util.List;

public class PaperExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PaperExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPaperidIsNull() {
            addCriterion("paperId is null");
            return (Criteria) this;
        }

        public Criteria andPaperidIsNotNull() {
            addCriterion("paperId is not null");
            return (Criteria) this;
        }

        public Criteria andPaperidEqualTo(Integer value) {
            addCriterion("paperId =", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidNotEqualTo(Integer value) {
            addCriterion("paperId <>", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidGreaterThan(Integer value) {
            addCriterion("paperId >", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidGreaterThanOrEqualTo(Integer value) {
            addCriterion("paperId >=", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidLessThan(Integer value) {
            addCriterion("paperId <", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidLessThanOrEqualTo(Integer value) {
            addCriterion("paperId <=", value, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidIn(List<Integer> values) {
            addCriterion("paperId in", values, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidNotIn(List<Integer> values) {
            addCriterion("paperId not in", values, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidBetween(Integer value1, Integer value2) {
            addCriterion("paperId between", value1, value2, "paperid");
            return (Criteria) this;
        }

        public Criteria andPaperidNotBetween(Integer value1, Integer value2) {
            addCriterion("paperId not between", value1, value2, "paperid");
            return (Criteria) this;
        }

        public Criteria andPapernameIsNull() {
            addCriterion("paperName is null");
            return (Criteria) this;
        }

        public Criteria andPapernameIsNotNull() {
            addCriterion("paperName is not null");
            return (Criteria) this;
        }

        public Criteria andPapernameEqualTo(String value) {
            addCriterion("paperName =", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameNotEqualTo(String value) {
            addCriterion("paperName <>", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameGreaterThan(String value) {
            addCriterion("paperName >", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameGreaterThanOrEqualTo(String value) {
            addCriterion("paperName >=", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameLessThan(String value) {
            addCriterion("paperName <", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameLessThanOrEqualTo(String value) {
            addCriterion("paperName <=", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameLike(String value) {
            addCriterion("paperName like", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameNotLike(String value) {
            addCriterion("paperName not like", value, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameIn(List<String> values) {
            addCriterion("paperName in", values, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameNotIn(List<String> values) {
            addCriterion("paperName not in", values, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameBetween(String value1, String value2) {
            addCriterion("paperName between", value1, value2, "papername");
            return (Criteria) this;
        }

        public Criteria andPapernameNotBetween(String value1, String value2) {
            addCriterion("paperName not between", value1, value2, "papername");
            return (Criteria) this;
        }

        public Criteria andSubjectIsNull() {
            addCriterion("subject is null");
            return (Criteria) this;
        }

        public Criteria andSubjectIsNotNull() {
            addCriterion("subject is not null");
            return (Criteria) this;
        }

        public Criteria andSubjectEqualTo(String value) {
            addCriterion("subject =", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotEqualTo(String value) {
            addCriterion("subject <>", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectGreaterThan(String value) {
            addCriterion("subject >", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectGreaterThanOrEqualTo(String value) {
            addCriterion("subject >=", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLessThan(String value) {
            addCriterion("subject <", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLessThanOrEqualTo(String value) {
            addCriterion("subject <=", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectLike(String value) {
            addCriterion("subject like", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotLike(String value) {
            addCriterion("subject not like", value, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectIn(List<String> values) {
            addCriterion("subject in", values, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotIn(List<String> values) {
            addCriterion("subject not in", values, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectBetween(String value1, String value2) {
            addCriterion("subject between", value1, value2, "subject");
            return (Criteria) this;
        }

        public Criteria andSubjectNotBetween(String value1, String value2) {
            addCriterion("subject not between", value1, value2, "subject");
            return (Criteria) this;
        }

        public Criteria andFillNumIsNull() {
            addCriterion("fill_num is null");
            return (Criteria) this;
        }

        public Criteria andFillNumIsNotNull() {
            addCriterion("fill_num is not null");
            return (Criteria) this;
        }

        public Criteria andFillNumEqualTo(Integer value) {
            addCriterion("fill_num =", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumNotEqualTo(Integer value) {
            addCriterion("fill_num <>", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumGreaterThan(Integer value) {
            addCriterion("fill_num >", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("fill_num >=", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumLessThan(Integer value) {
            addCriterion("fill_num <", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumLessThanOrEqualTo(Integer value) {
            addCriterion("fill_num <=", value, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumIn(List<Integer> values) {
            addCriterion("fill_num in", values, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumNotIn(List<Integer> values) {
            addCriterion("fill_num not in", values, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumBetween(Integer value1, Integer value2) {
            addCriterion("fill_num between", value1, value2, "fillNum");
            return (Criteria) this;
        }

        public Criteria andFillNumNotBetween(Integer value1, Integer value2) {
            addCriterion("fill_num not between", value1, value2, "fillNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumIsNull() {
            addCriterion("judge_num is null");
            return (Criteria) this;
        }

        public Criteria andJudgeNumIsNotNull() {
            addCriterion("judge_num is not null");
            return (Criteria) this;
        }

        public Criteria andJudgeNumEqualTo(Integer value) {
            addCriterion("judge_num =", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumNotEqualTo(Integer value) {
            addCriterion("judge_num <>", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumGreaterThan(Integer value) {
            addCriterion("judge_num >", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("judge_num >=", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumLessThan(Integer value) {
            addCriterion("judge_num <", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumLessThanOrEqualTo(Integer value) {
            addCriterion("judge_num <=", value, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumIn(List<Integer> values) {
            addCriterion("judge_num in", values, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumNotIn(List<Integer> values) {
            addCriterion("judge_num not in", values, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumBetween(Integer value1, Integer value2) {
            addCriterion("judge_num between", value1, value2, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andJudgeNumNotBetween(Integer value1, Integer value2) {
            addCriterion("judge_num not between", value1, value2, "judgeNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumIsNull() {
            addCriterion("multi_num is null");
            return (Criteria) this;
        }

        public Criteria andMultiNumIsNotNull() {
            addCriterion("multi_num is not null");
            return (Criteria) this;
        }

        public Criteria andMultiNumEqualTo(Integer value) {
            addCriterion("multi_num =", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumNotEqualTo(Integer value) {
            addCriterion("multi_num <>", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumGreaterThan(Integer value) {
            addCriterion("multi_num >", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("multi_num >=", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumLessThan(Integer value) {
            addCriterion("multi_num <", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumLessThanOrEqualTo(Integer value) {
            addCriterion("multi_num <=", value, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumIn(List<Integer> values) {
            addCriterion("multi_num in", values, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumNotIn(List<Integer> values) {
            addCriterion("multi_num not in", values, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumBetween(Integer value1, Integer value2) {
            addCriterion("multi_num between", value1, value2, "multiNum");
            return (Criteria) this;
        }

        public Criteria andMultiNumNotBetween(Integer value1, Integer value2) {
            addCriterion("multi_num not between", value1, value2, "multiNum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}